In an effort to provide more useful services, content and user experience on a network site, such as an Internet site, web page developers study how users make use of web pages on a particular web site. One way to understand the usefulness of particular features of a web page are to track what features are frequently clicked on by users and what features are rarely clicked on by users. In addition, keeping track of pages and portions of pages viewed by users may also provide useful information to developers and others.
To undertake such study, user patterns are tracked by keeping logs of all the clicks and page views on a web page. To utilize a click tracking system, each link contained in a web page has a particular set of click code that is produced based on the type of the link and the content to which a link references. When a link is clicked, a client (i.e., user computer) is first directed to a tracking server where the click information gets logged. Thereafter, the client is redirected to a destination specified in the link. User patterns are derived from statistics generated from log files on the tracking server.
Each link has an associated script (typically JavaScript) function that details the click code, destination address, etc. Each link script may also have parameters to define if the link is a link to a page on an internal site or an external site. Each link also may be programmed to behave differently depending on if the link is a link to a web page or a link to media content. Furthermore, the link script may depend on various external files for redirection code.
All this requires a significant amount of code to be manually included in every file to generate an appropriate click tracking element for a particular click tracking system. This also tends to create an undesirable amount of external dependencies. Unfortunately, the tedious nature of providing unique click code for each link in a web page necessarily creates a lot of room for errors by page developers. To avoid these problems, a standardized, declarative solution is desirable that would provide a more convenient and efficient way for page developers to provide certain functionality (such as click tracking and/or page view tracking) to their web pages.